// attendanceApi.js
import http from '../util/request.js';

export default {
    list: (params = {}) => http({
        url: '/api/attendance',
        method: 'get',
        params,
    }),
    add: (obj) => http({
        url: '/api/attendance',
        method: 'post',
        data: obj,
        headers: { 'Content-Type': 'application/json' },
    }),
    edit: (obj) => http({
        url: `/api/attendance/${obj.id}`,
        method: 'put',
        data: obj,
        headers: { 'Content-Type': 'application/json' },
    }),
    del: (id) => http({
        url: `/api/attendance/${id}`,
        method: 'delete',
    }),
};
